
function getUrlParam(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if (r != null) return unescape(r[2]);
    return null;
  }

console.log(getUrlParam('lang'),3123);
var obj = {
    lang:'zh'
}
if(getUrlParam('lang')=='en'){
   obj.lang = 'en'
}

const soccer = new Soccer(obj);
// soccer.test();
window.soccer = soccer;




// soccer.throwin();
// soccer.attack1();
// soccer.attack2();
// soccer.goal();

// soccer.status('完场');


//$(document).ready(function() {
var timeString = $('.ml1-SoccerClock_Clock').text();
var timeArray = timeString.split(':');
var minutes = parseInt(timeArray[0]);
var seconds = parseInt(timeArray[1]);
var totalTime = minutes * 60 + seconds;

var countdownInterval = setInterval(function () {
    if (totalTime <= 0) {
        clearInterval(countdownInterval);
        $('.ml1-SoccerClock_Clock').text('00:00');
    } else {
        minutes = Math.floor(totalTime / 60);
        seconds = totalTime % 60;
        $('.ml1-SoccerClock_Clock').text(minutes.toString().padStart(2, '0') + ':' + seconds.toString().padStart(
            2, '0'));
        totalTime++
    }
}, 1000);

// soccer.finish()
